home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-20 | 2.7 KB | 96 lines | [TEXT/MPS ] |
- /* ------------------------------------------------------------------------------
-
- FILENAME
- Utilities.c
-
- DESCRIPTION
- This header file contains declarations of the interface routines which are
- available in the Utilities.c file. These routines are utility routines (e.g.
- string manipulation routines) that are used by the other modules within the
- Additions printing extension.
-
-
- COPYRIGHT
- Copyright Apple Computer, Inc. 1991
- All rights reserved.
-
- INTERFACE ROUTINES
- GetCopiesFromJob
- MinNum
- StrCopyMax
- StrConcat
- CheckBoxIsOn
- EnableControlOnOff
-
- MODIFICATION HISTORY
- 05/15/91 ALA Initial Implementation
-
-
- ------------------------------------------------------------------------------- */
-
-
- /*==================================== INTERFACE ROUTINES ====================================*/
-
-
- /* ===== GetCopiesFromJob =====
-
- Returns the number of copies specified in the job record; 1 if the record cannot be accessed.
- */
- long GetCopiesFromJob( // (out) Number of copies in the job record
- Collection jobCollection); // (in) Documents job record
-
-
- /* ===== MinNum =====
-
- Returns the minimum of 'long1' and 'long2'.
- */
- long MinNum( // (out) the minimum of long1 and long2
- long long1, // (in) the first long to consider
- long long2); // (in) the second long to consider
-
-
- /* ===== StrCopyMax =====
-
- Copies the contents of 'srcStr' to 'dstStr', but copies no more than maxToCopy characters
- (not including the terminating '\0').
-
- Returns 'dstStr'.
- */
- char *StrCopyMax( // (out) pointer to 'dstStr'
- const char *srcStr, // (in) pointer to the string to copy (C string)
- char *dstStr, // (in) pointer to the string to receive the copy (C string)
- long maxToCopy); // (in) maximum number of characters to copy
-
-
- /* ===== StrConcat =====
-
- Concatenates 'str2' to the end of 'str1' (it is assumed that 'str1'
- can expand by strlen('str2') characters).
-
- Returns 'str1'.
- */
- char *StrConcat( // (out) pointer to 'str1' with 'str2' concatenated
- char *str1, // (in) pointer to the string to concatenate to (C string)
- const char *str2); // (in) pointer to the string to concatenate (C string)
-
-
- /* ===== CheckBoxIsOn =====
-
- CheckBoxIsOn turns true if a dialog checkbox button is checked; false otherwise.
- */
- Boolean CheckBoxIsOn( // (out) Returns true if button is checked; false otherwise
- DialogPtr pDlg, // (in) target dialog
- short whichItem); // (in) dialog item to be changed
-
-
- /* ===== EnableControlOnOff =====
-
- EnableControlOnOff enables or disables the specified radio button.
- */
- void EnableControlOnOff(
- DialogPtr pDlg, // (in) target dialog
- short whichItem, // (in) dialog item to be changed
- Boolean enableIt); // (in) T => enable the item; F => disable it
-
-
-